ci(preview): bisect invalid seed rows instead of replaying batches row-by-row (stage 3) - #1151
Draft
kyle-compute wants to merge 1 commit into
Draft
ci(preview): bisect invalid seed rows instead of replaying batches row-by-row (stage 3)#1151kyle-compute wants to merge 1 commit into
kyle-compute wants to merge 1 commit into
Conversation
…w-by-row The #1139 seed pathology: one constraint-violating row in a multi-row upsert batch dropped the whole chunk into a row-by-row fallback, so five legacy rows among ~900-row chunks cost thousands of pooler round trips (318s). The fallback now rolls the failed batch back at its savepoint, splits it in half, and recurses only into failing halves until invalid rows stand alone: O(k log n) probes for k bad rows in n rows, with valid rows retained. Only IntegrityError (SQLSTATE class 23) is splittable. The old catch-all also swallowed DBAPIError, so a dead connection or serialization failure was silently recorded as skipped rows -- transient infrastructure errors now abort the load instead of masquerading as bad data. Every seed run emits a deterministic report (batches attempted/split, rows skipped, SQLSTATE + constraint names with table-qualified row ids, before/after row counts by table) that flows through a new prepare-job output into the timing artifact and the job summary. Also repairs the local seed-test fixtures, which had silently rotted (they skip without ODDISH_DATABASE_URL): SQLAlchemy compiles multi-row inserts from the first dict's keys, so sparse rows had extra keys silently dropped and missing keys hard-error; a _rows() helper now unions the keys of each heterogeneous fixture group.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Oddish previewCommit:
Vercel deployment URL: https://oddish-meg535pol.oddish.app Plan:
This comment is updated by the PR Preview workflow. |
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this PR exists
Evidence
What this PR changes
What this PR does not change
Dependency and merge order
Validation completed
Remaining acceptance gate
Risk
Rollback
Revert this PR to restore the old loader. The seed telemetry field is additive and consumers already tolerate its absence. Reverting also restores the unsafe broad fallback, so rollback should be temporary while the concrete failure is fixed.